namespace Rsdn.Framework.Formatting.JetBrains.Annotations
{
    using System;
    using System.Runtime.CompilerServices;

    /// <summary>
    /// Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections)
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
    internal class MeansImplicitUseAttribute : Attribute
    {
        /// <summary>
        /// Initializes new instance of MeansImplicitUseAttribute
        /// </summary>
        [UsedImplicitly]
        public MeansImplicitUseAttribute() : this(ImplicitUseFlags.Default)
        {
        }

        /// <summary>
        /// Initializes new instance of MeansImplicitUseAttribute with specified flags
        /// </summary>
        /// <param name="flags">Value of type <see cref="T:Rsdn.Framework.Formatting.JetBrains.Annotations.ImplicitUseFlags" /> indicating usage kind</param>
        [UsedImplicitly]
        public MeansImplicitUseAttribute(ImplicitUseFlags flags)
        {
            this.Flags = flags;
        }

        /// <summary>
        /// Gets value indicating what is meant to be used
        /// </summary>
        [UsedImplicitly]
        public ImplicitUseFlags Flags
        {
            get; private set;
        }
    }
}

